export function joinArray(value, arg) {
  var a
  if (!arg) {
    return null
  }
  if (arg.length > 1) {
    a = arg.join(',')
  } else {
    a = arg[0]
  }
  return a
}

export function total(value, list) {
  let a = 0
  if (!list) {
    return a
  }
  list.forEach(e => {
    a += Number(e)
  })
  return a
}

export function productTitle(value, obj) {
  if (!obj) {
    return ''
  }
  return (obj.productName || '') + '  /  ' + (obj.itemNo || '') + '  /  ' + (obj.area || '') + '  /  ' + (obj.brandName || '') + '\n\n\n\n\n\n\n' + (obj.status === 3 ? '不通过理由：' + obj.remark : '')
}

export function productTitle2(value, obj) {
  if (!obj) {
    return ''
  }
  return (obj.productName || '') + '  /  ' + (obj.itemNo || '') + '  /  ' + (obj.area || '') + '  /  ' + (obj.brandName || '')
}

export default {

}
